﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

using EShop.BLL;
using EShop.Model;

namespace EShop.Client
{
    public partial class frmEmployeeInfoCurrentEmployee : frmBase
    {
        string strEmployeeID = oShopConfigInfo.LoginID;
        public frmEmployeeInfoCurrentEmployee()
        {
            InitializeComponent();
        }

        private void frmEmployeeInfoCurrentEmployee_Load(object sender, EventArgs e)
        {
            groupBox1.Text = strEmployeeID;
            EmployeeBLL oEmployeeBLL = new EmployeeBLL();
            DataTable dt = oEmployeeBLL.QueryEmployeeInfo(strEmployeeID);
            string msg = string.Empty;

            msg += "\r\n\t工号:\t" + dt.Rows[0]["EmployeeID"].ToString();
            msg += "\r\n\r\n\t姓名:\t" + dt.Rows[0]["FullName"].ToString();
            msg += "\r\n\r\n\t身份证号码:\t" + dt.Rows[0]["EmployeePID"].ToString();
            msg += "\r\n\r\n\t性别:\t" + ((bool)dt.Rows[0]["Sex"] == false ? "男" : "女");
            msg += "\r\n\r\n\t生日:\t" + ((bool)dt.Rows[0]["IsGregorianCalendar"] == false ? "农历" : "公历") + "," + ((DateTime)dt.Rows[0]["Brithday"]).ToString("yyyy-MM-dd");
            msg += "\r\n\r\n\t籍贯:\t" + dt.Rows[0]["Popedom"].ToString();
            msg += "\r\n\r\n\t联系地址:\t" + dt.Rows[0]["Address"].ToString();
            msg += "\r\n\r\n\t手机号码:\t" + dt.Rows[0]["Mobile"].ToString();
            msg += "\r\n\r\n\t备注:\t" + dt.Rows[0]["Remark"].ToString();
            msg += "\r\n\r\n\t添加时间:\t" + dt.Rows[0]["CreateDatetime"].ToString();
            msg += "\r\n\r\n\t权限:\t" + dt.Rows[0]["EmployeePurview"].ToString();
            this.lblMsg.Text = msg;
            
            //msg+=
        }

        private void btnDone_Click(object sender, EventArgs e)
        {
            Close();
        }
    }
}
